<%-- 
    Document   : newtype
    Created on : Aug 8, 2014, 8:57:42 AM
    Author     : THANMINH
--%>

<%@page import="java.util.ArrayList"%>
<%@page import="model.entities.NewsType"%>
<%@page import="java.util.List"%>
<%@page import="java.util.List"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <meta name="description" content="">
        <meta name="author" content="">

        <title>Admin Page</title>
        <link rel="stylesheet" href="css/style.css" type="text/css">
        <!-- Bootstrap Core CSS -->
        <link href="admin/css/bootstrap.min.css" rel="stylesheet">
        <link href="admin/css/bootstrap-2.3.min.css" rel="stylesheet">
        <!-- MetisMenu CSS -->
        <link href="admin/css/plugins/metisMenu/metisMenu.min.css" rel="stylesheet">
        <!-- Custom Fonts -->
        <link href="admin/font-awesome-4.1.0/css/font-awesome.min.css" rel="stylesheet" type="text/css">
        <!-- Custom CSS -->
        <link href="admin/css/sb-admin-2.css" rel="stylesheet">

    </head>
    <body>
        <div id="wrapper">

            <!-- Navigation -->
            <nav class="navbar navbar-default navbar-static-top" role="navigation" style="margin-bottom: 0">
                <div class="navbar-header">
                    <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                    </button>
                    <a class="navbar-brand" href="index.html">Admin - LUD Team</a>
                </div>
                <!-- /.navbar-header -->

                <ul class="nav navbar-top-links navbar-right">

                    <li class="dropdown">
                        <a class="dropdown-toggle" data-toggle="dropdown" href="#">
                            <i class="fa fa-user fa-fw"></i>  <i class="fa fa-caret-down"></i>
                        </a>
                        <ul class="dropdown-menu dropdown-user">
                            <li><a href="#"><i class="fa fa-user fa-fw"></i> User Profile</a>
                            </li>
                            <li><a href="#"><i class="fa fa-gear fa-fw"></i> Settings</a>
                            </li>
                            <li class="divider"></li>
                            <li><a href="#"><i class="fa fa-sign-out fa-fw"></i> Logout</a>
                            </li>
                        </ul>
                        <!-- /.dropdown-user -->
                    </li>
                    <!-- /.dropdown -->
                </ul>
                <!-- /.navbar-top-links -->

                <div class="navbar-default sidebar" role="navigation">
                    <%@include file="sidebar.jsp" %>
                    <!-- /.sidebar-collapse -->
                </div>
                <!-- /.navbar-static-side -->
            </nav>

            <div id="page-wrapper" style="min-height: 317px;">
                                    

                                    <form action="/LUD-Blog/NewTypeServlet" method="Get">
                                        <table class="table table-hover">
                                            <thead>
                                                <tr>
                                                    <th>Id New Type</th>
                                                    <th>Name</th>
                                                    <th>Descriptions</th>
                                                    <th>Actived</th>
                                                </tr>
                                            </thead>
                                            <tbody>
                                                <% List<NewsType> newstype = (List<NewsType>) request.getAttribute("newsType"); %>

                                                <% if (newstype != null) {%>
                                                <% for (NewsType news : newstype) {%>
                                                <tr>
                                                    <td><%= news.getIdNewType()%></td>
                                                    <td><%= news.getName()%></td>
                                                    <td><%= news.getDescriptions()%></td>
                                                    <td><%= news.isIsActived()%></td>
                                                    <td><a href="/LUD-Blog/NewTypeServlet?action=1&id=<%= news.getIdNewType()%>">Edit</a></td>
                                                    <td><a href="/LUD-Blog/NewTypeServlet?action=2&id=<%= news.getIdNewType()%>">Hide</a></td>
                                                    <td><a href="/LUD-Blog/NewTypeServlet?action=3&id=<%= news.getIdNewType()%>">Show</a></td>
                                                    <td><a href="/LUD-Blog/NewTypeServlet?action=4&id=<%= news.getIdNewType()%>">Delete</a></td>
                                                </tr>
                                                <% }
                        }%>
                                                <tr>
                                                    <td><input type="submit" value="Add" name="action" class=" btn btn-danger " /></td>
                                                    <td></td>
                                                    <td></td>
                                                    <td></td>
                                                </tr>
                                            </tbody>
                                        </table>

                                    </form>
                                </div>
            <!-- /#page-wrapper -->

        </div>

        <!-- /#wrapper -->

        <!-- jQuery Version 1.11.0 -->
        <script src="admin/js/jquery-1.11.0.js"></script>

        <!-- Bootstrap Core JavaScript -->
        <script src="admin/js/bootstrap.min.js"></script>

        <!-- Metis Menu Plugin JavaScript -->
        <script src="admin/js/plugins/metisMenu/metisMenu.min.js"></script>

        <!-- Custom Theme JavaScript -->
        <script src="admin/js/sb-admin-2.js"></script>

        <!-- Page-Level Demo Scripts - Tables - Use for reference -->


    </body>
</html> 
